import React from 'react'

export default class Chk extends React.Component {
    state = {
        chk: false
    }
    changHandle = (e) => {
        //  获取当前复选框的状态值
        console.log(e.target.checked, 4444);
        this.setState({
            chk: e.target.checked
        })
    }
    render() {
        return (
            <div>类组件
                <input checked={this.state.chk} type='checkbox' onChange={this.changHandle} />
            </div>
        )
    }
}